﻿using Platformer_Example.Controller.Character;
using System;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Platformer_Example.Controller.Map
{
    public class MapObjectData
    {
        public string MapName { get; private set; }
        public TE_Vector2 NewPosition { get; private set; }

        public MapObjectData(string mapName, TE_Vector2 positionGridBound)
        {
            MapName = mapName;
            NewPosition = new TE_Vector2(positionGridBound);
        }

        public MapObjectData(string description)
        {
            var values = description.Split(' ');
            MapName = values[0];
            NewPosition = new TE_Vector2(Convert.ToSingle(values[1]),
                                         Convert.ToSingle(values[2]));
        }
    }
}